package com.zx.ecode.ui.fragment;

import android.app.Activity;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.zx.ecode.BuildConfig;
import com.zx.ecode.R;
import com.zzp.basepresenter.ui.fragment.BaseFragment;
import com.zzp.basepresenter.util.LayoutUtil;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MineFragment extends BaseFragment {
    private static MineFragment instance;
    @BindView(R.id.tv_vaccination_times)
    TextView tvVaccinationTimes;
    @BindView(R.id.tv_nucleic_acid_tests)
    TextView tvNucleicAcidTests;
    @BindView(R.id.ll_user_information)
    LinearLayout llUserInformation;
    @BindView(R.id.iv_export_private_key)
    ImageView ivExportPrivateKey;
    @BindView(R.id.rl_export_private_key)
    RelativeLayout rlExportPrivateKey;
    @BindView(R.id.iv_replace_psd)
    ImageView ivReplacePsd;
    @BindView(R.id.rl_replace_psd)
    RelativeLayout rlReplacePsd;
    @BindView(R.id.iv_help_center)
    ImageView ivHelpCenter;
    @BindView(R.id.rl_help_center)
    RelativeLayout rlHelpCenter;
    @BindView(R.id.iv_share_app)
    ImageView ivShareApp;
    @BindView(R.id.rl_share_app)
    RelativeLayout rlShareApp;
    @BindView(R.id.iv_about_us)
    ImageView ivAboutUs;
    @BindView(R.id.tv_version)
    TextView tvVersion;
    @BindView(R.id.rl_about_us)
    RelativeLayout rlAboutUs;
    @BindView(R.id.iv_connect_us)
    ImageView ivConnectUs;
    @BindView(R.id.rl_connect_us)
    RelativeLayout rlConnectUs;
    @BindView(R.id.ll_mine_setting)
    LinearLayout llMineSetting;

    public static MineFragment getInstance() {
        if (instance == null) {
            synchronized (MineFragment.class) {
                if (instance == null) {
                    instance = new MineFragment();
                }
            }
        }
        return instance;
    }

    @Override
    public void bindButter(View view) {
        ButterKnife.bind(this, view);
    }

    @Override
    protected int setContentView() {
        return R.layout.fragment_mine;
    }

    @Override
    protected void lazyLoad(Activity context, View view) {
        llUserInformation.setLayoutParams(LayoutUtil.getInstance().getRelativeLayoutMarginParams(context, llUserInformation));
        tvVersion.setText(BuildConfig.VERSION_NAME);
    }
}
